package com.prs.crm.domain.sale;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.prs.crm.domain.FlowCodeEntity;
import com.prs.crm.domain.fs.BankAccount;
import com.prs.crm.domain.fs.PayWay;

@Entity
@Table(name = "sale_saleReceivesRgist")
public class SalesReceivesRegist extends FlowCodeEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	
	@ManyToOne
	private BankAccount bankAccount;

	@ManyToOne
	private SalesReceives salesReceives;

	/**
	 * 底单日期
	 */

	private Date billDate;

	/**
	 * 底单金额
	 */

	private Double billAmount;

	/**
	 * 底单编号
	 */

	private String billCode;

	/**
	 * 付款方式
	 */
    @ManyToOne
	private PayWay payWay;
    
//    @OneToOne(fetch=FetchType.LAZY,mappedBy="salesReceivesRegist")
//	private Code code;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public SalesReceives getSalesReceives() {
		return salesReceives;
	}

	public void setSalesReceives(SalesReceives salesReceives) {
		this.salesReceives = salesReceives;
	}

	public Date getBillDate() {
		return billDate;
	}

	public void setBillDate(Date billDate) {
		this.billDate = billDate;
	}

	public Double getBillAmount() {
		return billAmount;
	}

	public void setBillAmount(Double billAmount) {
		this.billAmount = billAmount;
	}

	public String getBillCode() {
		return billCode;
	}

	public void setBillCode(String billCode) {
		this.billCode = billCode;
	}

	public PayWay getPayWay() {
		return payWay;
	}

	public void setPayWay(PayWay payWay) {
		this.payWay = payWay;
	}

	public BankAccount getBankAccount() {
		return bankAccount;
	}

	public void setBankAccount(BankAccount bankAccount) {
		this.bankAccount = bankAccount;
	}

//	public Code getCode() {
//		return code;
//	}
//
//	public void setCode(Code code) {
//		this.code = code;
//	}

}
